Conversation
9c722c3 to
b0ea5a5
Compare
cd544dd to
4814d7c
Compare
…he recursive functions themselves.
…that removes ones that have reference to the return expression.
…ng new traversal method
…e empty anymore (or have holes)
…lear measure to prove termination
…d many else relations into conjunctions.
…t length and inverse opt
…ion) for Rocq only.
…case coercions support projections with type parameters
…structors/fields.
… is generally complicated enough.
… atom for disambiguation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Playing around with a new Lean4 backend (not based on #2) but rather fresh, adapting the Rocq backend from @DCupello1. Opening this PR to have a place for notes and comments, not meant for merging.
Status
IR-to-IR passes that may be useful
Issues with Lean that we might want to fix or work-around
deriving DecidableEqfor nested inductives (e.g.instr) Support for mutual and nested inductive types asDecidableEqinstance generator leanprover/lean4#2329.Using
BEqso far. (Or maybe we can do away with equality checks on instructions?)Nested inductive predicates with indices in parameters Nested inductives cannot have indices leanprover/lean4#1964
This is a big one, as this is a kernel issue. We have two work-arounds:
Use the lattice-based construction for predicates that is behind
coinduction, and can also do inductives. This can handle that kind of nested recursion.Write
which makes the nested induction go through. Conveniently we already generate
xs == yssie-conditions, so this works easily forForall₂as well.